package ZooManager;

import java.util.ArrayList;

/**
* User: James Barker
* Date: 6/08/12
*/
public class Cage {
    String enclosureName;
    int enclosureNumber;
    int enclosureSize;
    String enclosureType;
    int noOfEntries;
    String exhibitName;
    String exhibitDesc;
    boolean lightsOn;
    boolean cageOccupied;
    ArrayList<Entry> entries = new ArrayList<Entry>();


    /**
    * Cage Constructor
    */
    public Cage(String enclosureName, int enclosureNumber, int enclosureSize, String enclosureType, int noOfEntries, String exhibitName, String exhibitDesc) {
        this.enclosureName = enclosureName;
        this.enclosureNumber = enclosureNumber;
        this.enclosureSize = enclosureSize;
        this.enclosureType = enclosureType;
        this.noOfEntries = noOfEntries;
        this.exhibitName = exhibitName;
        this.exhibitDesc = exhibitDesc;
        this.lightsOn = false;
    }

    public String getEnclosureName() {
        return enclosureName;
    }

    public int getEnclosureNumber() {
        return enclosureNumber;
    }

    public int getEnclosureSize() {
        return enclosureSize;
    }

    public String getEnclosureType() {
        return enclosureType;
    }

    public int getNoOfEntries() {
        return noOfEntries;
    }

    public String getExhibitName() {
        return exhibitName;
    }

    public String getExhibitDesc() {
        return exhibitDesc;
    }

    public Boolean isLightsOn() {
        return lightsOn;
    }

    public void turnLightsOn() {
        lightsOn = true;
    }

    public void turnLightsOff() {
        lightsOn = false;
    }

    public Boolean isCageOccupied() {
        return cageOccupied;
    }

    public void setCageOccupied() {
        cageOccupied = true;
    }

    public void setCageUnoccupied() {
        cageOccupied = false;
    }

    public ArrayList getEntries() {
        return entries;
    }

    public void addEntry(Entry entry) {
        entries.add(entry);
    }

    public void closeAllEntries() {
        for (Entry e : entries) {
            e.closeEntry();
        }
    }
}
